using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using ConsoleApplication1.Models.Mapping;

namespace ConsoleApplication1.Models
{
    public class MyDBContext : DbContext
    {
        static MyDBContext()
        {
            Database.SetInitializer<MyDBContext>(null);
        }

		public MyDBContext()
			: base("Name=MyDBContext")
		{
		}

        public DbSet<User> Users { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new UserMap());
        }
    }
}
